package com.wchat.network.message.share;

import java.io.Serializable;
import java.util.ArrayList;

import org.simpleframework.xml.ElementList;
import org.simpleframework.xml.Root;

@Root
public class ShareDirectory implements Serializable {

	private static final long serialVersionUID = 6567986262647514796L;
	
	@ElementList
	private ArrayList<ShareItem> items = new ArrayList<ShareItem>();
	
	public ArrayList<ShareItem> getItems() {
		return items;
	}
	
	public void addItem(ShareItem item) {
		if (!items.contains(item))
			items.add(item);
	}
	
	public void removeItem(ShareItem item) {
		items.remove(item);
	}

	@Override
	public String toString() {
		return "ShareDirectory [items=" + items + "]";
	}
	
	
}
